x86emul: fix 3-operand IMUL
authorJan Beulich <jbeulich@suse.com>
Fri, 1 Feb 2019 10:32:35 +0000 (11:32 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 1 Feb 2019 10:32:35 +0000 (11:32 +0100)
commitde094111f46239b7ad0a3b4ce69b286182febf72
tree5e023ca5c027b210dce3c0cae2231527d790d1bc
parentdd914e4c6fc91f576846855ab14d473f576835bd
x86emul: fix 3-operand IMUL

While commit 75066cd4ea ("x86emul: fix {,i}mul and {,i}div") indeed did
as its title says, it broke the 3-operand form by uniformly using AL/AX/
EAX/RAX as second source operand. Fix this and add tests covering both
cases.

Reported-by: Andrei Lutas <vlutas@bitdefender.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: 19232b378fab04997c0612e5c19e82c29b59d99e
master date: 2018-12-18 14:27:09 +0100
tools/tests/x86_emulator/test_x86_emulator.c
xen/arch/x86/x86_emulate/x86_emulate.c